package com.corner.model.cornerservice.service;

import com.corner.model.cornerservice.domain.Conversation;
import com.corner.model.cornerservice.service.exception.BaseException;

import java.util.List;
import java.util.Map;

import retrofit.http.Body;
import retrofit.http.DELETE;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.PUT;
import retrofit.http.Path;
import retrofit.http.Query;

public interface ConversationService {
    @GET("/conversation/count")
    Map<String, Long> count()
            throws BaseException;

    @GET("/conversation/count")
    Map<String, Long> count(@Query("query") String query) throws BaseException;

    @GET("/conversation")
    List<Conversation> list()
            throws BaseException;

    @GET("/conversation")
    List<Conversation> list(@Query("query") String query) throws BaseException;

    @GET("/conversation/{objectId}")
    Conversation get(@Path("objectId") Long objectId) throws BaseException;

    @GET("/conversation/{objectId}")
    Conversation get(@Path("objectId") Long objectId, @Query("query") String query) throws BaseException;

    @PUT("/conversation/{objectId}")
    Map<String, Object> update(@Path("objectId") Long objectId,
                               @Body Conversation conversation)
            throws BaseException;

    @DELETE("/conversation/{objectId}")
    Map<String, Object> delete(@Path("objectId") Long objectId) throws BaseException;

    @POST("/conversation")
    Map<String, Object> save(@Body Conversation conversation) throws BaseException;


}
